#include "taskqueue.hpp"
#include "consumer.hpp"
#include "producer.hpp"
#include <thread>
int main(int argc, char *argv[])
{
    producer pr;
    consumer co;
    taskqueue taskQue(10);
    // 线程的入口函数使用的是值传递
    thread pro(&producer::produce, &pr, std::ref(taskQue));
    thread con(&consumer::consume, &co, std::ref(taskQue));
    pro.join();
    con.join();
    return 0;
}
